export const pickerOptions = {
    shortcuts: [
        {
            text: '最近一天',
            onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 1)
                picker.$emit('pick', [start, end])
            },
        },
        {
            text: '最近三天',
            onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 3)
                picker.$emit('pick', [start, end])
            },
        },

        {
            text: '最近七天',
            onClick(picker) {
                const end = new Date()
                const start = new Date()
                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
                picker.$emit('pick', [start, end])
            },
        },
    ],
}
// 右键菜单配置 特征值
export const contextMenuData1 = {
    // 菜单名称   同一界面必须唯一
    menuName: 'deviceEig',
    // 菜单显示的坐标位置
    axis: {
        x: null,
        y: null,
    },
    // 菜单选项
    menulists: [
        {
            fnHandler: 'downloadData',
            btnName: '导出特征值数据',
        },
    ],
}
// 图谱
export const contextMenuData2 = {
    // 菜单名称   同一界面必须唯一
    menuName: 'deviceDomain',
    // 菜单显示的坐标位置
    axis: {
        x: null,
        y: null,
    },
    // 菜单选项
    menulists: [
        {
            fnHandler: 'downloadData',
            btnName: '导出波形频谱数据',
        },
    ],
}
let status = {
    0: '停机',
    1: '正常',
    2: '告警',
    3: '离线',
}
export const deviceConfig = {
    details: [
        {
            label: '设备名',
            name: 'device_name',
        },
        {
            label: '类型',
            name: 'device_type',
        },
        {
            label: '工厂',
            name: 'factory_name',
        },
        {
            label: '区域',
            name: 'zone_name',
        },
        {
            label: '设备状态',
            name: 'status',
            format: (val) => status[val],
        },
    ],
}
